package com.hqyj.controller;


import com.hqyj.pojo.Tuihuo;
import com.hqyj.service.ITuihuoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 * 退货记录 前端控制器
 * </p>
 *
 * @author rock
 * @since 2021-10-21
 */
@RestController
@RequestMapping("/tuihuo")
public class TuihuoController {

    //注入TuihuoService
    @Autowired(required = false)
    ITuihuoService tuihuoService;

    //加载库存页面
    @RequestMapping("/tuihuoList")
    public HashMap<String,Object> storehouseList(Tuihuo tuihuo){
        return tuihuoService.select(tuihuo);
    }

    //删除
    @RequestMapping("/del")
    public HashMap<String ,Object> tuihuoDel(int tuihuoId){
        System.out.println("delete:"+tuihuoId);
        return tuihuoService.del(tuihuoId);
    }

}

